package com.codrim.cs.data.rpc.enums;

import com.codrim.common.utils.enums.EnumWithKeyDesc;

/**
 * Created by liang.ma on 02/11/2017.
 */
public enum OrderBy implements EnumWithKeyDesc<Short> {
    Desc(OrderBy.DESC, "desc"),
    Ignore(OrderBy.IGNORE, "ignore"),
    Asc(OrderBy.ASC, "asc"),;
    private short key;
    private String type;
    public static final short DESC = -1;
    public static final short IGNORE = 0;
    private static final short ASC = 1;

    OrderBy(short key, String type) {
        this.key = key;
        this.type = type;
    }

    @Override
    public String getDesc() {
        return type;
    }

    @Override
    public Short getKey() {
        return key;
    }
}
